package com.huluobo.a2202mvvm_im_douyindemo.chat;

import android.content.Intent;
import android.view.View;

import com.huluobo.a2202mvvm_im_douyindemo.R;
import com.huluobo.a2202mvvm_im_douyindemo.pay.PayActivity;
import com.hyphenate.easeui.modules.chat.EaseChatFragment;
import com.hyphenate.easeui.modules.chat.interfaces.IChatExtendMenu;

/**
 * Created by LC on 2024/4/26.
 */
public class ChatFragment extends EaseChatFragment {
    @Override
    public void initView() {
        super.initView();
        IChatExtendMenu chatExtendMenu = chatLayout.getChatInputMenu().getChatExtendMenu();
        chatExtendMenu.registerMenuItem("红包", R.drawable.baseline_payment_24, 333);
    }

    @Override
    public void onChatExtendMenuItemClick(View view, int itemId) {
        super.onChatExtendMenuItemClick(view, itemId);
        if (itemId == 333) {
            Intent intent = new Intent(requireContext(), PayActivity.class);
            intent.putExtra("conversationId",conversationId);
            startActivity(intent);
        }
    }
}
